//
//  WordHotTabelHeaderCollectionViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/31.
//  Copyright (c) 2015年 蓝鸥0825. All rights reserved.
//

#import "WordHotTabelHeaderCollectionViewCell.h"
#import "UIImageView+WebCache.h"

@implementation WordHotTabelHeaderCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
        [self create];
    }
    return self;
    
}

- (void)create{
    
    self.imageCellCollectionWordHotHeader = [[UIImageView alloc] initWithFrame:CGRectMake(self.frame.size.width / 100 * 2, self.frame.size.height / 100, self.frame.size.width / 100 * 96, self.frame.size.height /100 * 70)];
    [self addSubview:self.imageCellCollectionWordHotHeader];
    [self.imageCellCollectionWordHotHeader release];
    
    self.labelCellCollectionWordHotHeader = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.size.width / 100 * 2, self.frame.size.height / 100 * 71, self.frame.size.width / 100 * 96, self.frame.size.height / 100 * 25)];
    [self addSubview:self.labelCellCollectionWordHotHeader];
    [self.labelCellCollectionWordHotHeader release];
}



- (void)setModelCollectionWordHotHeader:(WordHotTabelHeaderModel *)modelCollectionWordHotHeader{
    
    if (_modelCollectionWordHotHeader != modelCollectionWordHotHeader) {
        [_modelCollectionWordHotHeader release];
        _modelCollectionWordHotHeader = [modelCollectionWordHotHeader retain];
    }
    self.labelCellCollectionWordHotHeader.text = self.modelCollectionWordHotHeader.name;
    [self.imageCellCollectionWordHotHeader sd_setImageWithURL:[NSURL URLWithString:self.modelCollectionWordHotHeader.img ]placeholderImage:[UIImage imageNamed:@"placeholder.png"]];

}



@end